import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listFactory(dataParam) {
  return request({
    url: '/factory/list',
    method: 'post',
    data: dataParam
  })
}

// 查询【请填写功能名称】详细
export function getFactoryDetailById(params) {
  return request({
    url: '/factory/getFactoryDetailById',
    method: 'get',
    params
  })
}

// 新增【请填写功能名称】
export function addFactory(data) {
  return request({
    url: '/factory/saveOrUpdate',
    method: 'post',
    data: data
  })
}



// 根据工厂id删除
export function delFactory(id) {
  return request({
    url: '/factory/' + id,
    method: 'delete'
  })
}



// 获取工厂货架列表
export function getFactoryWithShelve(data) {
  return request({
    url: '/factory/getFactoryWithShelve',
    method: 'post',
    data
  })
}


// 派单配置
export function dispatch(data) {
  return request({
    url: '/factory/dispatch',
    method: 'post',
    data
  })
}


// getFactoryDispatchConfig 获取派单配置覆盖范围
export function getFactoryDispatchConfig(params) {
  return request({
    url: '/factory/getFactoryDispatchConfig' ,
    method: 'get',
    params
  })
}

// 服务类型
export function getServiceType(params) {
  return request({
    url: '/factory/getServiceType' ,
    method: 'get',
    params
  })
}



// 工厂类型
export function getFactoryType(params) {
  return request({
    url: '/factory/getFactoryType' ,
    method: 'get',
    params
  })
}